package com.myleetcode.twonumbers;

public class Test {

	public static void main(String[] args) {
		Node n11=new Node();
		n11.setVal(2);
		Node n12=new Node();
		n12.setVal(4);
		Node n13=new Node();
		n13.setVal(3);
		Node n14=new Node();
		n14.setVal(3);
		n11.setNext(n12);
		n12.setNext(n13);
		n13.setNext(n14);
		
		Node n21=new Node();
		n21.setVal(5);
		Node n22=new Node();
		n22.setVal(6);
		Node n23=new Node();
		n23.setVal(4);
		Node n24=new Node();
		n24.setVal(8);
		Node n25=new Node();
		n25.setVal(9);
		Node n26=new Node();
		n26.setVal(9);
		n21.setNext(n22);
		n22.setNext(n23);
		n23.setNext(n24);
		n24.setNext(n25);
		n25.setNext(n26);
		
		Solution s=new Solution();
		Node n=s.addTwoNumbers(n11, n21);
		int i=0;
		while(n!=null) {
			if(i!=0) {
				System.out.print("->");
			}
			System.out.print(n.getVal());
			n=n.getNext();
			i++;
		}
	}

}
